package HLLibClasses;

import HLCode.HLClassManager;
import HLCode.HLLibClass;
import HLCode.HLObject;
import HLLib.base.HLIntListEncrypted;

public class HLClassIntListEncrypted extends HLLibClass {
    public HLClassIntListEncrypted(HLClassManager owner) {
        super(owner);
    }

    public HLObject NewObject() {
        return new HLIntListEncrypted();
    }

    public void Execute(HLObject self, int index, HLObject args, HLObject resultOwnerObject, int resultIndex) {
        switch (index) {
        case 0: {
            ((HLIntListEncrypted) self).SetCount(args.GetInt(0));
            break;
        }
        case 1: {
            ((HLIntListEncrypted) self).SetItem(args.GetInt(0), args.GetInt(1));
            break;
        }
        case 2: {
            if (resultOwnerObject == null) {
                ((HLIntListEncrypted) self).GetItem(args.GetInt(0));
            } else {
                resultOwnerObject.SetInt(resultIndex, ((HLIntListEncrypted) self).GetItem(args.GetInt(0)));
            }
            break;
        }
        case 3: {
            ((HLIntListEncrypted) self).Add(args.GetInt(0));
            break;
        }
        case 4: {
            ((HLIntListEncrypted) self).Clear();
            break;
        }
        case 5: {
            if (resultOwnerObject == null) {
                ((HLIntListEncrypted) self).Count();
            } else {
                resultOwnerObject.SetInt(resultIndex, ((HLIntListEncrypted) self).Count());
            }
            break;
        }
        case 6: {
            ((HLIntListEncrypted) self).Insert(args.GetInt(0), args.GetInt(1));
            break;
        }
        case 7: {
            ((HLIntListEncrypted) self).RemoveAt(args.GetInt(0));
            break;
        }
        case 8: {
            ((HLIntListEncrypted) self).Resize(args.GetInt(0), args.GetInt(1));
            break;
        }
        case 9: {
            if (resultOwnerObject == null) {
                ((HLIntListEncrypted) self).GetIntList();
            } else {
                resultOwnerObject.SetObject(resultIndex, ((HLIntListEncrypted) self).GetIntList());
            }
            break;
        }
        case 10: {
            if (resultOwnerObject == null) {
                ((HLIntListEncrypted) self).IsCheat();
            } else {
                resultOwnerObject.SetBoolean(resultIndex, ((HLIntListEncrypted) self).IsCheat());
            }
            break;
        }
        }
    }
}
